package com.ytkj.digitalConstruction.enums.asset;

/**
 * 资产状态
 *
 * @author liuht
 * @phone 13823600456
 * @email laupete@qq.com
 * @date 2018年3月5日
 */
public enum AssetStatus {

	DELETED(0, "已删除"),

	USABLE(1, "正常"),

	USING(2, "正在使用"),;

	private int status;

	private String name;

	private AssetStatus(int status, String name) {
		this.status = status;
		this.name = name;
	}

	public static AssetStatus ofValue(int status) {
		for (AssetStatus as : AssetStatus.values()) {
			if (as.intVal() == status) {
				return as;
			}
		}
		return null;
	}

	public int intVal() {
		return status;
	}

	public String string() {
		return name;
	}

}
